<template>
	<view class="costPopup">
		<view class="popupTitle">保证金明细</view>
		<view class="content">
			<view class="totalPrice ">
				<view class="carNum">共计保证金金额</view>
				<view class="price">
					<view class="priceNum">¥ {{totalDeposit}}</view>
				</view>
			</view>
			<view class="infoItem" v-for="(item,index) in list" :key="index">
				<view class="infoCell">
					<view class="title">{{item.brand}} {{item.series}} {{item.model}}</view>
					<view class="data grey">x{{item.vinsList.length}}</view>
				</view>
				<view class="infoCell">
					<view class="title tiny grey">
						<view class="">
							<view v-for="(vin,i) in item.vinsList" :key="i">车架号：{{vin}}</view>
						</view>
					</view>
				</view>
				<view class="infoCell">
					<view class="tag">保证金比例：{{item.marginRatio}}%</view>
					<view class="tag">保证金金额：￥{{item.totalDeposit}}</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		name: "carsList",
		props: {
			list: {
				type: Array,
				default: () => []
			},
			totalDeposit: {
				type: Number,
				default: 0
			}
		},
		watch: {},
		data() {
			return {

			};
		},
		onReady() {},
		methods: {

		}
	}
</script>

<style lang="scss">
	.popupTitle {
		margin-bottom: 0;
	}

	.costPopup {
		padding: 40rpx;
	}

	.totalPrice {
		display: flex;
		height: 100rpx;

		line-height: 100rpx;
		background: #FFF;



		.carNum {
			font-size: 24rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			color: #878787;
			margin-right: 20rpx;
		}

		.price {
			font-size: 24rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			color: #202020;
			display: flex;

			.priceNum {
				font-size: 28rpx;
				font-family: DINAlternate, DINAlternate;
				font-weight: bold;
				color: #F76260;
			}
		}
	}
</style>